package com.ybkj.daijia.server.mapper;

import com.ybkj.daijia.server.model.DriverLevelMoneyDetail;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * Created by mqs on 15/3/6.
 */
public interface DriverLevelMoneyDetailMapper {

    /**
     * 保存梯度收费详细
     *
     * @param record
     * @return
     */
    int insertRecord(DriverLevelMoneyDetail record);

    /**
     * 批量保存梯度收费详细
     *
     * @param records
     * @return
     */
    int batchInsertRecord(List<DriverLevelMoneyDetail> records);

    /**
     * 根据主键查询梯度收费详细
     *
     * @param id
     * @return
     */
    DriverLevelMoneyDetail selectByPrimaryKey(Long id);

    /**
     * 根据一组主键查询梯度收费详细
     *
     * @param ids
     * @return
     */
    List<DriverLevelMoneyDetail> selectByIdIn(Long[] ids);

    /**
     * 根据主键删除梯度收费详细
     *
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 根据收费时间段删除梯度收费详细
     *
     * @param chargeStartTimeId
     * @return
     */
    int deleteByMoneyTime(
        @Param("moneyTimeId") Long moneyTimeId);

    /**
     * 根据主键修改梯度收费详细
     *
     * @param record
     * @return
     */
    int updateByPrimaryKey(DriverLevelMoneyDetail record);

    /**
     * 根据区域删除所有里程计费
     *
     * @param areaId
     * @return
     */
    int deleteByDriverLeavel(Long driverLevelId);
}
